package Client.Utils
{
	
	/**
	 * class		Utils
	 * @desc		some util methods
	 * @author		Aqua
	 * @date		2011-9-7
	 */
	public class Utils
	{
		/**************************************************************************
		 * function				getXMLByID
		 * @desc				get XML data of some object by its ID
		 * @param	id			unique ID of the object
		 * @param	xmlList		a XMLList that contains the xml data which needed
		 * @return	XML			XML data that needed
		 *************************************************************************/
		public static function getXMLByID(id:String, xmlList:XMLList):XML
		{
			var item:XML;
			
			for each(item in xmlList)
			{
				if (item.id == id)
				{
					return item;
				}
			}
			
			return null;
		}
	}
	
}